package top.lshaci.learning.alibaba.cloud.seata.order.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * StorageFeign
 *
 * @author lshaci
 * @since 1.0.0
 */
@FeignClient(value = "storage", path = "storage")
public interface StorageFeign {

    /**
     * 扣除存储数量
     *
     * @param commodityCode 商品编号
     * @param count         数量
     */
    @GetMapping("/deduct/{commodityCode}/{count}")
    void deduct(@PathVariable("commodityCode") String commodityCode, @PathVariable("count") int count);
}
